<script setup lang="js">
import { onMounted, reactive} from 'vue';
import axios from 'axios';
const config = reactive({
    data: [],
    unit: '个',
    columnWidth: [50],
    rowNum:10,
    headerHeight:30,
})
function getData() {
    //-:获取服务器数据
    axios.get('/Pro-Postgraduate/querySumCollege')
        .then((response) => {
            //console.log(response.data)
            //if (response.data.code == 200) {
                let obj = reactive({})
                for (let index = 0; index < response.data.length; index++) {
                    let yobj = response.data[index];
                    obj = {
                        name: yobj.province,
                        value: yobj.shuliang
                    }
                    
                    config.data.push(obj)
                }
            
        })
    }
onMounted(() => {
    getData();
})
</script>
<template>
    <dv-decoration-7 linkto style="width:200px;height:30px;color: azure;position: fixed;top:10%">
        <router-link to="/pageTwo">各省大学数量排名</router-link>
    </dv-decoration-7>
    <dv-scroll-ranking-board :config="config"  style="width:300px;height:390px;position: relative; top:10%; left:5%; right:10% "/>
</template>
<style lang="css" scoped>
a{
    text-decoration: none;
    color: azure;
    font-size: 18px;
  }
</style>